<?php

namespace app\admin\model;

use think\Model;


class Feditionordershopifyd extends Model
{





    // 表名
    protected $name = 'fedition_ordershopify';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'status_text'
    ];

    public function getStatusList()
    {
        return ['solicitation' => __('揽件'), 'way' => __('在途'), 'sign' => __('签收'), 'rejection' => __('拒收')];
    }

    public function gettimeList()
    {
        return ['1' => __('今天'),
            '2' => __('昨天'),
            '3' => __('最近七天'),
            '4' => __('最近三十天'),
            '5' => __('本月'),
            '6' => __('上月'),
        ];
    }


    public function getStatusTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
        $list = $this->getStatusList();
        return isset($list[$value]) ? $list[$value] : '';
    }




}
